package com.foreveross.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.foreveross.common.Constants;
import com.foreveross.dao.HouseUserDAO;
import com.foreveross.dao.VisitorCheckInDAO;
import com.foreveross.vo.HouseRepair;
import com.foreveross.vo.VisitorCheckIn;

@Service("visitorCheckInService")
@Transactional
public class VisitorCheckInService extends BaseService {

	@Resource
	public VisitorCheckInDAO visitorCheckInDAO;

	public List<VisitorCheckIn> findVisitorCheckInList(String name,
			String phone, String user_id, String houseId, String code,
			String weixinId, int pageIndex, int pageSize,String userId) throws Exception {
		return visitorCheckInDAO.findVisitorCheckInList(name, phone, user_id,
				houseId, code, weixinId, pageIndex, pageSize,userId);
	}

	public long getVisitorCheckInListCount(String name, String phone,
			String user_id, String houseId, String code, String weixinId,String userId)
			throws Exception {
		return visitorCheckInDAO.getVisitorCheckInListCount(name, phone,
				user_id, houseId, code, weixinId,userId);
	}

	public VisitorCheckIn getVisitorCheckIn(String id, String weixinId) throws Exception {
		return visitorCheckInDAO.getVisitorCheckIn(id,weixinId);
	}
	
	public VisitorCheckIn scanVisitorCheckIn(String ticketId) throws Exception {
		return visitorCheckInDAO.scanVisitorCheckIn(ticketId);
	}

}
